import nodeResolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import typescript from '@rollup/plugin-typescript'
export default [
  {
    // 入口文件
    input: './packages/vue/src/index.ts',
    // 打包出口
    output: [
      {
        file: './packages/vue/dist/vue.js',
        format: 'iife',
        name: 'Vue'
      }
    ],
    plugins: [
      typescript({
        moduleResolution: 'nodenext',
        module: 'nodenext', // 添加这一行
        sourceMap: true,
        outDir: './packages/vue/dist/vue.min.js'
      }),
      // 模块导入的路径补全
      nodeResolve(),
      commonjs()
    ]
  }
]
